1. Field
The following description relates generally to a technology for graphics state management, and according to an example to a technology for graphics state management in which memory is allocated and deallocated using reference states of memory pages, which correspond to graphics states.
2. Description of Related Art
A modern graphics library such as DirectX or OpenGL (Open Graphics Library) is a big state machine that operates according to graphics states. For example, for one graphics process to perform operations such as a draw call, a sequence of graphics states is required to be maintained simultaneously. The sequence of graphics states is graphics state versions that are created while one graphics state changes gradually. Data of these consecutive graphics state versions do not generally change much, so that when creating a new graphics state version, data of a previous version may be copied or a pointer may be used to refer to overlapping portions of the data.
During one graphics process in which consecutive graphics states are maintained, a specific graphics state version may be created and/or terminated. When a graphics state version is created, pages are allocated in memory or pages of other versions are referenced without allocating pages. Once a graphics state version has been terminated, a page, to which the version has been allocated, is required to be deallocated. However, in a case where the page is referenced in another version, the page may not be deallocated. For this reason, reference states of each page are needed to be managed for allocation and deallocation of memory. Operations of allocation and deallocation of memory, which are required to control changes of graphics states, may affect the entire performance of a system that performs a graphics process. For example, the operations may affect memory and operations associated with reference states of memory pages of graphics states. Accordingly, the performance of an entire system may be improved by minimizing the operations required for graphics state changes. Accordingly, there is a need for a technology that allows efficient operations of checking, increasing, or reducing of reference states of memory pages, which correspond to graphics states.